<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>作品管理-个人中心-魔步网</title>
<?php include_once(VIEWPATH."public/header_title.php");?>
<link href="<?php echo _get_cfg_path('css')?>base.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('css')?>common.css" type="text/css" rel="stylesheet" />
<link href="<?php echo _get_cfg_path('lib')?>uploadify/uploadify.css" type="text/css" rel="stylesheet" />
<!--[if IE 6]>
<script src="js/DD_belatedPNG.js" type="text/javascript" ></script>
<script>DD_belatedPNG.fix('a,img');</script>
<![endif]-->
</head>
<body>
<?php include_once(VIEWPATH."public/header.php");?>
<div class="mainbody" id="mainbody">
    <div class="container mrgB30">
        <div class="member clearfix">
            <?php include_once(VIEWPATH."m/public/left_menu.php");?>
            <div class="fr uc_content">
                <?php include_once(VIEWPATH."m/public/notice.php");?>
                
                <div class="clearfix uitopg">
                    <div class="transa">
                        <div class="aut_bti clearfix"><h3 class="fl">作品管理</h3>
                            <?php if ($this->input->get('agid')) {?>
                            <div class="fr photoback">
                                <a href="/m/model"  title="返回">返回</a>
                            </div>
                            <?php }?>
                        </div>
                        <div class="works malbums mworks">
                            <div class="aut_bti mw_upload clearfix">
                                <a class="fl addto ato_1" href="/m/works/photo<?php if($this->input->get('agid')) echo '?agid='.$this->input->get('agid');?>"><i></i>上传照片</a>
                                <!--<a class="fl addto ato_1" href="/m/works/photo/0"><i></i>上传照片</a>-->
                                <a class="fl addto" id="TX-create-album" href="javascript:;"><i></i>创建相册</a>
                            </div>
                            <div class="works malbums personal" style="padding:0;">
                            <?php foreach ($list as $k=>$val):?>
                            <div class="parent_page">
                            <div class="title sub_photo_type" data-key="<?=$k?>" data-flag="1"><?php if ($k == 0) echo '精选作品';else echo $photoArr[$k];?></div>
                            <ul class="clearfix">
                                <?php foreach ($val as $key => $a): ?>
                                <li <?php if ($key>5):?>class="hide_photo_show photo_hide_<?=$k?>"<?php endif;?>>
                                    <a title="查看相册" href="/m/works/photo/<?php echo $a['id']?>?agid=<?php echo _get_key_val($agid);?>">
                                        <img src="<?php echo (0 === strncmp($a['showimg'], './', 2))? substr($a['showimg'], 1): $a['showimg'];?>" />
                                        <div class="mwk_hover"></div>
                                        <div class="wor_wzi">
                                            <h3><span id="X-tit-<?=_get_key_val($a['id'])?>"><?=$a['title']?></span><span>（<?=$a['photonum']?>张）</span></h3>
                                            <p>创建时间：<?=date('Y-m-d H:i:s',$a['addtime'])?></p>
                                        </div>
                                    </a>
                                    <div class="mwk_hover mwk_hover_span">
                                        <p>
                                            <span title="编辑相册" class="mh_1 XT-album" _val="<?=_get_key_val($a['id'])?>"></span>
										<?php if($a['kind']<>1){?>
                                            <span title="删除相册" class="mh_2 XT-del-album" _val="<?=_get_key_val($a['id'])?>"></span>
                                            <a href="/m/works/photo/<?php echo $a['id']?>?agid=<?php echo _get_key_val($agid);?>">
                                                <span title="作品上传" style="margin-top:15px;" class="mh_6"></span></a>
                                            <!--span title="编辑相册" style="margin-left:20px;" class="mh_1 XT-album" _val="<?=_get_key_val($a['id'])?>"></span-->
                                        <?php }else{?>
                                            <a href="/m/works/photo/<?php echo $a['id']?>?agid=<?php echo _get_key_val($agid);?>">
                                                <span title="作品上传" style="margin-left:15px;" class="mh_6"></span></a>
                                        <?php }?>
                                            <input type="hidden" value="<?php echo _get_key_val($a['userid'])?>" name="userid"/>
                                        </p>
                                    </div>
                                </li>
                                <?php endforeach;?>
                              </ul>
                              <?php if ($key>5):?>
				            	<div class="clearfix more_photo_div"><a href="javascript:void(0);" onclick="morePhoto(<?=$k?>,this)">查看更多<br/><img src="<?php echo _get_cfg_path('images')?>more_flag.gif" alt="更多" title="更多"/></a></div>
				            	<div class="clearfix less_photo_div"><a href="javascript:void(0);" onclick="lessPhoto(<?=$k?>,this)">缩回<br/><img src="<?php echo _get_cfg_path('images')?>less_flag.gif" alt="缩回" title="缩回"/></a></div>
				              <?php endif;?>
				              </div>
                              <?php endforeach;?>
                              </div>
                        </div>
                        <!-- <div class="page">
		                	<?=$list['pages']?>
		                </div> -->
                    </div>
                </div>
            </div>
        </div>
        <div class="help_bottom"></div>
    </div> 
</div>
<!--mainbody-->
<?php include_once(VIEWPATH."public/footer.php");?>

<div class="popover-mask"></div>
<div class="popover complaint popover_works" style="height:auto;margin:-260px 0 0 -230px;">
    <div class="compl_top">
        <span class="fl" id="X-title">创建相册</span>
        <a href="javascript:;" id="TX-win-close" title="关闭" class="close fr">×</a></div>
  <div class="compl_con">
      <form action="/m/works/addalbum" method="post" enctype="multipart/form-data">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <input type="hidden" name="albumid" id="albumid" value=""/>
            <input type="hidden" name="agid" id="agid" value="<?=$this->input->get('agid')?>"/>
            <p class="fr f_prompt" id="prompt" style="width:90%;">请输入正确的密码</p>
            <tr class="select_type_tr">
            	<td width="80"><font>相册类型：</font></td>
            	<td>
            		<select name="type" style="width:312px" class="txt select_type">
            			<?php if ($photoArr):foreach ($photoArr as $key=>$val):?>
            				<option value="<?=$key?>"><?=$val?></option>
            			<?php endforeach;endif;?>
            		</select>
            	</td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td width="80"><font>相册名称：</font></td>
              <td><input style="width:300px" id="title" class="txt" name="title" type="text" placeholder="请输入相册名称（最多15个字符）" maxlength="15"/></td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td width="80"><font>相册封面：</font></td>
              <td>
              	<div class="filebox" style="height:91px;">
              	 <!-- 艺人管理：艺人ID -->
              	 <input type="hidden" name="width" id="length_size" value="260"/>
              	 <input type="hidden" name="height" id="height_size" value="256"/>
              	 <input type="hidden" name="rel_width" id="rel_width_size"/>
              	 <input type="hidden" name="rel_height" id="rel_height_size"/>
              	
                 <div class="upload_btn photo_left_bg" style="top:0px;">
                    <a href="javascript:" style="text-align:center;margin-top:10px;">选择图片<input type="file" onChange="uploadImage(this)" id="cover" name="cover"></a>
                    <br/>
                    <span style="margin-left:20px;">支持JPG/PNG/GIF，上传图片大小不能超过1M</span>
                 </div>
              	   <div class="left fl">
                     <div id="localImag"><img id="preview1" src="" style="display:none;"/></div>
                     <!--通过生成尺寸和旋转角度 后台获取尺寸和旋转角度再进行裁剪-->
                     <input id="id_top" type="hidden" name="top" value="0">  <!--x轴-->
                     <input id="id_left" type="hidden" name="left" value="0"><!--y轴-->
                     <input id="id_right" type="hidden" name="right" value="0"><!--w轴-->
                     <input id="id_bottom" type="hidden" name="bottom" value="0"><!--h轴-->
                     <input id="id_widthPro" type="hidden" name="widthPro" value=""><!--宽度比例，原：现-->
                     <input id="id_heightPro" type="hidden" name="heightPro" value=""><!--高度比例，原：现-->
                     <input id="rotation" type="hidden" value="0" name="rotation">
                   </div>
              	
              	
              	
<!--                     <input class="txt" id="textfile" type="text" name="cover" value="" placeholder="相册封面,宽260px高256px"/>   -->
<!--                     <input class="inp_btn" type="button" name="cover" value="上传图片" /> -->
<!--                     <input class="inp_file" type="file" name="cover"  size="28" onchange="document.getElementById('textfile').value=this.value" /> -->
                
                
                	<!-- <a href="javascript:void(0);" class="reset_img" title="重选图片">
	                	<img src="<?php echo _get_cfg_path('images')?>reset.png"/>
	                </a> -->
                </div>
                
              </td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td valign="top"><font>相册描述：</font></td>
              <td><textarea class="txt text" id="memo" name="memo" cols="" rows="" placeholder="请添加相册描述" maxlength="50"></textarea></td>
            </tr>
            <tr><td height="10"></td></tr>
            <tr>
              <td>&nbsp;</td>
              <td><input class="but commit_album" name=""  type="submit" value="保存"/><span id="T-msg"></span></td>
            </tr>
        </table>
      </form>
    </div>
</div>
</body>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="<?=_get_cfg_path('js')?>jquery.imgareaselect.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>common.js"></script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>jquery.SuperSlide.2.1.1.js"></script>
<script>jQuery(".txtScroll-top").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"topLoop",autoPlay:true});</script>
<script type="text/javascript" src="<?php echo _get_cfg_path('js')?>pages/m/works.js"></script>
</html>